package com.example.spring_gobang.service;

import com.example.spring_gobang.mapper.UserMapper;
import com.example.spring_gobang.model.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public UserInfo selectByNamePassword(String username,String password){
        return userMapper.selectByNamePassword(username,password);
    }
    public Integer insertAndReg(String username,String password){
        return userMapper.insertAndReg(username,password);
    }
    public void userWin(Integer userId){
        userMapper.userWin(userId);
    }
    public void userLose(Integer userId){
        userMapper.userLose(userId);
    }
    public UserInfo selectByName(String username){
        return userMapper.selectByName(username);
    }
}
